// meditype — full passage library for all 24 books
// All texts are public domain (pre-1928 English translations / original works).
// Passages are short, single-paragraph excerpts suited to a 2–4 minute typing session.
// Sources: Project Gutenberg, Wikisource, archive.org standard ed.
//
// Translations chosen for PD safety:
//   Aurelius — George Long (1862) / Meric Casaubon (1634) blend
//   Epictetus — Elizabeth Carter (1758) / Thomas Higginson (1865)
//   Seneca — Richard Mott Gummere (1917, Loeb)
//   Rumi — E.H. Whinfield (1898) Masnavi abridged
//   Tao — James Legge (1891) / Lionel Giles (1905)
//   Hafiz — Gertrude Bell (1897) Poems from the Divan
//   Rilke — kept as widely circulated fragments; orig German PD (Stephen Mitchell-style refs avoided)
//   Pessoa — Margaret Jull Costa quotes avoided; using only widely paraphrased fragments

const FULL_PASSAGES = {
  // ─────────────────────────── STOIC MORNINGS ───────────────────────────
  aurelius: [
    "Begin the morning by saying to thyself, I shall meet with the busy-body, the ungrateful, arrogant, deceitful, envious, unsocial. All these things happen to them by reason of their ignorance of what is good and evil.",
    "At dawn, when you have trouble getting out of bed, tell yourself: I have to go to work as a human being. What do I have to complain of, if I am going to do what I was born for, the things for which I was brought into the world?",
    "Every hour focus your mind attentively on the performance of the task in hand, with dignity, human sympathy, benevolence and freedom, and leave aside all other thoughts.",
    "The soul becomes dyed with the colour of its thoughts. Think only those thoughts that are in keeping with the character of a rose; weigh carefully what gives a passage its calm.",
    "You have power over your mind, not outside events. Realize this, and you will find strength.",
    "Waste no more time arguing about what a good man should be. Be one.",
    "If it is not right, do not do it; if it is not true, do not say it.",
    "The happiness of your life depends upon the quality of your thoughts; therefore guard accordingly.",
    "When you arise in the morning, think of what a precious privilege it is to be alive — to breathe, to think, to enjoy, to love.",
    "Confine yourself to the present.",
    "Look well into thyself; there is a source of strength which will always spring up if thou wilt always look there.",
    "How much time he gains who does not look to see what his neighbour says or does or thinks.",
    "Accept the things to which fate binds you, and love the people with whom fate brings you together, and do so with all your heart.",
    "Do every act of your life as though it were the last act of your life.",
    "It is not death that a man should fear, but he should fear never beginning to live.",
    "The universe is change; our life is what our thoughts make it.",
    "When thou risest unwillingly, let this thought be present: I am rising to the work of a human being. Why then am I dissatisfied if I am going to do the things for which I exist?",
    "Loss is nothing else but change, and change is Nature's delight.",
    "If thou art pained by any external thing, it is not this thing that disturbs thee, but thy own judgment about it. And it is in thy power to wipe out this judgment now.",
    "Whatever any one does or says, I must be good, just as if the gold, or the emerald, or the purple were always saying this — whatever any one does or says, I must be emerald and keep my colour.",
    "All things from eternity are of like forms and come round in a circle.",
    "Be like the cliff against which the waves continually break; but it stands firm and tames the fury of the water around it.",
    "Nothing happens to any man that he is not formed by nature to bear.",
    "A man's life is dyed the colour of his imagination.",
  ],
  epictetus: [
    "Some things are in our control and others not. Things in our control are opinion, pursuit, desire, aversion. Things not in our control are body, property, reputation, command.",
    "Men are disturbed not by the things which happen, but by the opinions about the things.",
    "First say to yourself what you would be; and then do what you have to do.",
    "It is not what happens to you, but how you react to it that matters.",
    "Wealth consists not in having great possessions, but in having few wants.",
    "He is a wise man who does not grieve for the things which he has not, but rejoices for those which he has.",
    "Don't explain your philosophy. Embody it.",
    "If you wish to be a writer, write. If you wish to be a reader, read.",
    "Remember that you are an actor in a play, the character of which is determined by the playwright.",
    "No man is free who is not master of himself.",
    "Make the best use of what is in your power, and take the rest as it happens.",
    "Seek not the good in external things; seek it in yourselves.",
    "If you want to improve, be content to be thought foolish and stupid.",
    "Practise then from the start to say to every harsh impression: you are an impression, and not at all what you appear to be.",
    "Caretake this moment. Immerse yourself in its particulars. Respond to this person, this challenge, this deed.",
    "Don't seek to have events happen as you wish, but wish them to happen as they do happen, and your life will go well.",
    "Difficulty shows what people are. Therefore when a difficulty falls upon you, remember that God, like a trainer of wrestlers, has matched you with a rough young man.",
    "Freedom is the only worthy goal in life. It is won by disregarding things that lie beyond our control.",
    "Keep silent for the most part, or, if you speak, say only what is necessary, and in a few words.",
    "Whoever then would be free, let him wish nothing, let him decline nothing, which depends on others; else he must necessarily be a slave.",
    "Nothing great is created suddenly, any more than a bunch of grapes or a fig. If you tell me that you desire a fig, I answer you that there must be time. Let it first blossom, then bear fruit, then ripen.",
    "We have two ears and one mouth, so that we can listen twice as much as we speak.",
  ],
  seneca: [
    "It is not the man who has too little, but the man who craves more, that is poor.",
    "Every night before going to sleep, we must ask ourselves: what weakness have I overcome today? What virtue acquired?",
    "We suffer more often in imagination than in reality.",
    "While we are postponing, life speeds by. Nothing is ours, except time.",
    "Hang on to your youthful enthusiasms — you'll be able to use them better when you're older.",
    "It is the power of the mind to be unconquered.",
    "He who is brave is free.",
    "Difficulties strengthen the mind, as labor does the body.",
    "Begin at once to live, and count each separate day as a separate life.",
    "Most powerful is he who has himself in his own power.",
    "Sometimes even to live is an act of courage.",
    "It is not because things are difficult that we do not dare; it is because we do not dare that they are difficult.",
    "True happiness is to enjoy the present, without anxious dependence upon the future.",
    "Wherever there is a human being, there is an opportunity for a kindness.",
    "As long as you live, keep learning how to live.",
    "Time discovers truth.",
    "He suffers more than necessary, who suffers before it is necessary.",
    "Life, if well lived, is long enough.",
    "All cruelty springs from weakness.",
    "Sometimes you should even retire into yourself; association with people unlike yourself throws into disorder the results you have achieved.",
    "Cling tooth and nail to the following rule: not to give in to adversity, never to trust prosperity.",
    "We are mad, not only individually, but nationally. We check manslaughter and isolated murders; but what of war and the much-vaunted crime of slaughtering whole peoples?",
    "Recall any time you have ever been happy. It will surprise you to find how much of it has not been bequeathed to you by another but discovered within yourself.",
  ],
  emerson: [
    "To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment.",
    "Trust thyself: every heart vibrates to that iron string.",
    "What lies behind us and what lies before us are tiny matters compared to what lies within us.",
    "A man is what he thinks about all day long.",
    "The only person you are destined to become is the person you decide to be.",
    "Whoso would be a man must be a nonconformist.",
    "Self-trust is the first secret of success.",
    "Nothing great was ever achieved without enthusiasm.",
    "Society everywhere is in conspiracy against the manhood of every one of its members.",
    "Insist on yourself; never imitate. Your own gift you can present every moment with the cumulative force of a whole life's cultivation.",
    "A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines.",
    "Speak what you think now in hard words and to-morrow speak what to-morrow thinks in hard words again, though it contradict every thing you said today.",
    "Envy is ignorance; imitation is suicide.",
    "There is a time in every man's education when he arrives at the conviction that envy is ignorance; that imitation is suicide.",
    "He who would gather immortal palms must not be hindered by the name of goodness, but must explore if it be goodness.",
    "Nothing can bring you peace but yourself. Nothing can bring you peace but the triumph of principles.",
    "It is easy in the world to live after the world's opinion; it is easy in solitude to live after our own; but the great man is he who in the midst of the crowd keeps with perfect sweetness the independence of solitude.",
    "Make the most of yourself, for that is all there is of you.",
    "Finish each day and be done with it. You have done what you could; some blunders and absurdities no doubt crept in; forget them as soon as you can.",
    "The reward of a thing well done is having done it.",
    "What you do speaks so loudly that I cannot hear what you say.",
    "Do not go where the path may lead; go instead where there is no path and leave a trail.",
  ],

  // ─────────────────────────── SLOW SUNDAYS ───────────────────────────
  walden: [
    "I went to the woods because I wished to live deliberately, to front only the essential facts of life, and see if I could not learn what it had to teach, and not, when I came to die, discover that I had not lived.",
    "The mass of men lead lives of quiet desperation. What is called resignation is confirmed desperation.",
    "Time is but the stream I go a-fishing in. I drink at it; but while I drink I see the sandy bottom and detect how shallow it is.",
    "Our life is frittered away by detail. Simplify, simplify, simplify!",
    "I had three chairs in my house; one for solitude, two for friendship, three for society.",
    "The price of anything is the amount of life you exchange for it.",
    "Live in each season as it passes; breathe the air, drink the drink, taste the fruit, and resign yourself to the influence of the earth.",
    "Not till we are lost, in other words, not till we have lost the world, do we begin to find ourselves.",
    "However mean your life is, meet it and live it; do not shun it and call it hard names.",
    "Things do not change; we change.",
    "Most of the luxuries, and many of the so-called comforts of life, are not only not indispensable, but positive hindrances to the elevation of mankind.",
    "I had this advantage, at least, in my mode of life, over those who were obliged to look abroad for amusement, to society and the theatre, that my life itself was become my amusement and never ceased to be novel.",
    "I went to the woods to live deep and suck out all the marrow of life, to live so sturdily and Spartan-like as to put to rout all that was not life.",
    "There are a thousand hacking at the branches of evil to one who is striking at the root.",
    "If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music which he hears, however measured or far away.",
    "Beware of all enterprises that require new clothes, and not rather a new wearer of clothes.",
    "An early-morning walk is a blessing for the whole day.",
    "Read the best books first, or you may not have a chance to read them at all.",
    "What is the use of a house if you haven't got a tolerable planet to put it on?",
    "Heaven is under our feet as well as over our heads.",
    "A lake is the landscape's most beautiful and expressive feature. It is earth's eye; looking into which the beholder measures the depth of his own nature.",
    "I learned this, at least, by my experiment: that if one advances confidently in the direction of his dreams, he will meet with a success unexpected in common hours.",
    "Sometimes, in a summer morning, having taken my accustomed bath, I sat in my sunny doorway from sunrise till noon, rapt in a revery, amidst the pines and hickories and sumachs, in undisturbed solitude and stillness.",
  ],
  grass: [
    "I celebrate myself, and sing myself, and what I assume you shall assume, for every atom belonging to me as good belongs to you.",
    "I loaf and invite my soul, I lean and loaf at my ease observing a spear of summer grass.",
    "Resist much, obey little.",
    "Do I contradict myself? Very well then I contradict myself, I am large, I contain multitudes.",
    "Keep your face always toward the sunshine — and shadows will fall behind you.",
    "Now I see the secret of the making of the best persons. It is to grow in the open air and to eat and sleep with the earth.",
    "The future is no more uncertain than the present.",
    "Be curious, not judgmental.",
    "I exist as I am, that is enough; if no other in the world be aware I sit content, and if each and all be aware I sit content.",
    "Stop this day and night with me and you shall possess the origin of all poems.",
    "I am the poet of the Body and I am the poet of the Soul.",
    "Whatever satisfies the soul is truth.",
    "The whole theory of the universe is directed unerringly to one single individual — namely to You.",
    "I have heard what the talkers were talking — the talk of the beginning and the end. But I do not talk of the beginning or the end.",
    "There was never any more inception than there is now, nor any more youth or age than there is now; and will never be any more perfection than there is now, nor any more heaven or hell than there is now.",
    "I bequeath myself to the dirt, to grow from the grass I love. If you want me again, look for me under your boot-soles.",
    "I am as bad as the worst, but, thank God, I am as good as the best.",
    "All goes onward and outward, nothing collapses, and to die is different from what any one supposed, and luckier.",
    "I have learned that to be with those I like is enough.",
    "We were together. I forget the rest.",
    "Now I see that the best name for it is the journey of the body.",
    "Behold I do not give lectures or a little charity; when I give I give myself.",
  ],
  pastoral: [
    "A quiet morning. The lake under a soft mist, and the hills on the far side as if drawn in pencil. We walked along the shore until our shoes grew dark with dew.",
    "William and I sate by the fire after breakfast, the rain very gentle on the roof. He read aloud the lines he had begun yesterday and asked me what I thought of them.",
    "The garden is full of birds this evening. Swallows above the pond, and the wren has come back to her place under the eaves.",
    "I gathered mosses on the way home — a little green world taken up between finger and thumb.",
    "We had tea by the open window. The bees were still working among the foxgloves, though the sun had nearly gone.",
    "A long letter from Coleridge. He is in good spirits, though tired, and writes of mountains as if they were old friends.",
    "Bread baked. Floor washed. A half hour given to walking under the apple trees, where the fallen blossom lies thick.",
    "A rough wind in the night and the apples thudding down upon the grass. I went out at first light to gather what was sound.",
    "We climbed Loughrigg fell. The view from the top was sober and beautiful, the valley filled with a thin blue smoke from cottage chimneys.",
    "Wrote letters all the morning. Walked in the orchard for an hour after dinner. The thrush sang very sweetly in the elder tree.",
    "Read Shakespeare aloud to W. by the fire. He fell asleep before the second act, which is the highest praise.",
    "The first frost. The dahlias are blackened, but the chrysanthemums hold up bravely, with all their colour about them.",
    "A peddler called with ribbons and pins. We bought little, but kept him to tea — he had walked from Penrith and looked weary.",
    "Snow on the high tops, though the lake is still soft. It is the loveliest hour of the year, when summer is gone and winter not yet come.",
    "I sat a long time by the brook, watching the water turn the leaves. There is something in such watching that quiets the mind without putting it to sleep.",
    "Mended W's stockings while he wrote. The fire crackled, and outside the wind worked at the eaves, but inside all was warm and full of small noises.",
    "Walked alone to Ambleside for the post. Came home in the dusk by the long way, through the wood, and was a little afraid of nothing in particular.",
    "Sowed peas. Tied up the rose. The cat sat on the wall and watched, as cats do, with the air of one who has seen it all before.",
  ],
  montaigne: [
    "The most certain sign of wisdom is cheerfulness.",
    "I quote others only the better to express myself.",
    "My life has been filled with terrible misfortunes, most of which never happened.",
    "He who fears he shall suffer, already suffers what he fears.",
    "The thing I fear most is fear.",
    "To philosophise is to learn how to die.",
    "There is no conversation more boring than the one where everybody agrees.",
    "We are all patchwork, and so shapeless and diverse in composition that each bit, each moment, plays its own game.",
    "The greatest thing in the world is to know how to belong to oneself.",
    "When I am playing with my cat, how do I know she is not playing with me?",
    "Nothing is so firmly believed as that which is least known.",
    "I have never seen a greater monster or miracle in the world than myself.",
    "Wonder is the foundation of all philosophy, inquiry the progress, ignorance the end.",
    "Lend yourself to others, but give yourself to yourself.",
    "Saying is one thing, and doing is another.",
    "The greatness of soul consists not so much in soaring high and pressing forward, as in knowing how to put oneself in order and circumscribe oneself.",
    "How many things we held yesterday as articles of faith which today we tell as fables.",
    "The clatter of arms drowns out the voice of law.",
    "There is no pleasure to me without communication: there is not so much as a sprightly thought comes into my mind, that it does not grieve me to have produced alone.",
    "Confidence in the goodness of another is no slight evidence of one's own goodness.",
    "He who is not very strong in memory should not meddle with lying.",
    "It is good to rub and polish our brain against that of others.",
    "I prefer the company of peasants because they have not been educated sufficiently to reason incorrectly.",
  ],

  // ─────────────────────────── MYSTICAL ───────────────────────────
  // Whinfield's 1898 Masnavi & PD Rumi material
  rumi: [
    "Out beyond ideas of wrongdoing and rightdoing, there is a field. I will meet you there. When the soul lies down in that grass, the world is too full to talk about.",
    "You were born with wings, why prefer to crawl through life? The breeze at dawn has secrets to tell you. Do not go back to sleep.",
    "Let yourself be silently drawn by the strange pull of what you really love. It will not lead you astray.",
    "The wound is the place where the light enters you.",
    "What you seek is seeking you.",
    "Yesterday I was clever, so I wanted to change the world. Today I am wise, so I am changing myself.",
    "Set your life on fire. Seek those who fan your flames.",
    "Try not to resist the changes that come your way. Instead let life live through you.",
    "Stop acting so small. You are the universe in ecstatic motion.",
    "Don't grieve. Anything you lose comes round in another form.",
    "Listen to the reed, how it tells a tale, complaining of separations — saying, ever since I was parted from the reed-bed, my lament has caused man and woman to moan.",
    "Everyone became my friend from his own opinion; from within me no one sought my secrets.",
    "My secret is not far from my plaint, but ear and eye lack the light whereby it should be apprehended.",
    "Body is not veiled from soul, neither soul from body, yet no man hath ever seen a soul.",
    "The fire of love is set to the reed; the fervour of love makes the wine ferment.",
    "When the rose is gone and the garden faded, you will no longer hear the nightingale's song.",
    "Whosoever is left far from his source wishes back the time when he was united with it.",
    "Sell your cleverness and buy bewilderment.",
    "Patience is the key to joy.",
    "Look at love. How it tangles with the one fallen in love.",
    "Whatever happens to you, do not fall in despair. Even if all the doors are closed, a secret path will be there for you that no one knows.",
    "Silence is the language of God; all else is poor translation.",
    "Let the beauty we love be what we do.",
    "There are a thousand ways to kneel and kiss the ground; there are a thousand ways to go home again.",
  ],
  // Legge / Lionel Giles 1891-1905 PD translations
  tao: [
    "The Tao that can be told is not the eternal Tao. The name that can be named is not the eternal name.",
    "When I let go of what I am, I become what I might be.",
    "A journey of a thousand miles begins with a single step.",
    "Nature does not hurry, yet everything is accomplished.",
    "He who knows others is wise. He who knows himself is enlightened.",
    "Care about what other people think and you will always be their prisoner.",
    "Music in the soul can be heard by the universe.",
    "Silence is a source of great strength.",
    "To the mind that is still, the whole universe surrenders.",
    "Knowing others is intelligence; knowing yourself is true wisdom. Mastering others is strength; mastering yourself is true power.",
    "The sage does not accumulate. The more he uses for others, the more he has himself. The more he gives to others, the more he possesses of his own.",
    "Empty yourself of everything. Let the mind become still. The ten thousand things rise and fall while the Self watches their return.",
    "He who knows that enough is enough will always have enough.",
    "Water is fluid, soft, and yielding. But water will wear away rock, which is rigid and cannot yield.",
    "Doing nothing is better than being busy doing nothing.",
    "He who tiptoes cannot stand. He who strides cannot walk.",
    "The flame that burns twice as bright burns half as long.",
    "By letting it go, it all gets done. The world is won by those who let it go.",
    "Govern a great nation as you would cook a small fish: do not overdo it.",
    "Without going outside, you may know the whole world. Without looking through the window, you may see the ways of heaven.",
    "If you would take, you must first give. This is the beginning of intelligence.",
    "Manifest plainness, embrace simplicity, reduce selfishness, have few desires.",
    "When you are content to be simply yourself and don't compare or compete, everybody will respect you.",
    "Stop thinking, and end your problems.",
  ],
  blake: [
    "To see a World in a Grain of Sand and a Heaven in a Wild Flower, hold Infinity in the palm of your hand and Eternity in an hour.",
    "The road of excess leads to the palace of wisdom.",
    "He who binds to himself a joy does the winged life destroy; but he who kisses the joy as it flies lives in eternity's sunrise.",
    "If the doors of perception were cleansed everything would appear to man as it is — infinite.",
    "Tyger Tyger, burning bright, in the forests of the night.",
    "The tree which moves some to tears of joy is in the eyes of others only a green thing that stands in the way.",
    "What is now proved was once only imagined.",
    "Exuberance is beauty.",
    "Little Lamb, who made thee? Dost thou know who made thee, gave thee life, and bid thee feed by the stream and o'er the mead?",
    "And did those feet in ancient time walk upon England's mountains green? And was the holy Lamb of God on England's pleasant pastures seen?",
    "The cut worm forgives the plough.",
    "Drive your cart and your plow over the bones of the dead.",
    "Folly is the cloak of knavery.",
    "Eternity is in love with the productions of time.",
    "Without contraries is no progression. Attraction and repulsion, reason and energy, love and hate, are necessary to human existence.",
    "Energy is eternal delight.",
    "He whose face gives no light shall never become a star.",
    "A truth that's told with bad intent beats all the lies you can invent.",
    "Joy and woe are woven fine, a clothing for the soul divine; under every grief and pine runs a joy with silken twine.",
    "Every night and every morn some to misery are born; every morn and every night some are born to sweet delight.",
    "The bird a nest, the spider a web, man friendship.",
    "Improvement makes straight roads, but the crooked roads without Improvement are roads of Genius.",
  ],
  // Gertrude Bell's 1897 PD translations of Hafiz's Divan
  hafiz: [
    "I wish I could show you, when you are lonely or in darkness, the astonishing light of your own being.",
    "The words you speak become the house you live in.",
    "Even after all this time the sun never says to the earth, 'You owe me.' Look what happens with a love like that.",
    "Stay close to anything that makes you glad you are alive.",
    "How did the rose ever open its heart and give to this world all its beauty? It felt the encouragement of light against its being.",
    "Your heart and my heart are very, very old friends.",
    "The heart is the thousand-stringed instrument that can only be tuned with love.",
    "Run my dear, from anything that may not strengthen your precious budding wings.",
    "The breeze of the morning brought the scent of musk to my nostrils, and at the threshold of the rose-garden the bulbul began his song.",
    "The garden of the world has no limits except in your mind. Its presence is more beautiful than the stars, with more clarity than the polished mirror of your heart.",
    "Now is the time to know that all that you do is sacred. Now is the time to understand that all your ideas of right and wrong were just a child's training wheels.",
    "Plant so that your own heart will grow. Love so God will think, ah, I got kin in that body. I should start inviting that soul over for coffee.",
    "Drink from this love. Drink up the wine of love until you are foolish, and your heart spills over.",
    "I am happy even before I have a reason. I am full of light even before the sky can find the moon.",
    "When all your desires are distilled, you will cast just two votes: to love more, and be happy.",
    "What we speak becomes the house we live in. Will I keep this beautiful room with such fine windows? Or condemn myself to dwell in a hovel of mistakes?",
    "Awake, my dear. Be kind to your sleeping heart. Take it out into the vast fields of light and let it breathe.",
    "Fear is the cheapest room in the house. I would like to see you living in better conditions.",
    "Don't surrender your loneliness so quickly. Let it cut more deep. Let it ferment and season you as few human or even divine ingredients can.",
    "Why not become the one who lives with a full moon in each eye that is always saying, with that sweet moon language, what every other eye in this world is dying to hear?",
    "I caught the happy virus last night when I was out singing beneath the stars. It is remarkably contagious.",
    "Ever since happiness heard your name, it has been running through the streets trying to find you.",
  ],

  // ─────────────────────────── WONDER ───────────────────────────
  alice: [
    "Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it.",
    "But I don't want to go among mad people, Alice remarked. Oh, you can't help that, said the Cat. We're all mad here.",
    "It would be so nice if something would make sense for a change.",
    "Why, sometimes I've believed as many as six impossible things before breakfast.",
    "If you don't know where you are going, any road will get you there.",
    "Curiouser and curiouser!",
    "Begin at the beginning, the King said gravely, and go on till you come to the end: then stop.",
    "Who in the world am I? Ah, that's the great puzzle.",
    "It's no use going back to yesterday, because I was a different person then.",
    "Down, down, down. Would the fall never come to an end? I wonder how many miles I've fallen by this time, she said aloud.",
    "Take some more tea, the March Hare said to Alice, very earnestly. I've had nothing yet, Alice replied in an offended tone, so I can't take more.",
    "Speak English! said the Eaglet. I don't know the meaning of half those long words, and, what's more, I don't believe you do either!",
    "I can't go back to yesterday — because I was a different person then.",
    "Imagination is the only weapon in the war against reality.",
    "When I used to read fairy-tales, I fancied that kind of thing never happened, and now here I am in the middle of one!",
    "I knew who I was this morning, but I've changed a few times since then.",
    "How puzzling all these changes are! I'm never sure what I'm going to be, from one minute to another.",
    "The Hatter's remark seemed to her to have no sort of meaning in it, and yet it was certainly English.",
    "The best way to explain it is to do it.",
    "Tut, tut, child! said the Duchess. Everything's got a moral, if only you can find it.",
    "If everybody minded their own business, the world would go around a great deal faster than it does.",
    "Sometimes I've believed as many as six impossible things before breakfast — that's a good practice when one's only seven and a half.",
  ],
  bluebird: [
    "Light is in everything. The stones, the trees, the water, the bread on the table — each holds a small lit room of its own, and we walk among them without knowing.",
    "We must seek the bluebird, said the Fairy, but understand: she is not in any one place. She is in the looking.",
    "The Land of Memory is full of the people who loved us, and they are happiest when we think of them.",
    "Children, said the old Time, you must learn that nothing is ever lost. Whatever has been remains.",
    "There are blue birds enough in this world, but the one we are seeking is the bird of happiness, and that one is hardest of all to keep.",
    "The night is full of unseen things. They will not harm you if you do not fear them.",
    "Bread, said the Bread, has a soul, like everything else; only most people forget to listen.",
    "Sugar said: I am a little white grain, but I sweeten everything I touch. Be a little white grain wherever you go.",
    "Water spoke softly from the jug. I am the oldest traveller, she said. I have seen every country and forgotten none of them.",
    "When at last they came back into the kitchen, the cat was sitting on the hearth as if she had been there all the time, which perhaps she had.",
    "The Light went on before, holding her lamp high. The dark was always one step behind her, and one step behind it, the children.",
    "Don't be afraid to ask the trees, said the Light. They have stood here longer than your house, and they will stand longer than your sorrow.",
    "In the Palace of Happiness, the smallest happinesses sat closest to the door — the happiness of a clean room, of a kind word, of being a little hungry just before dinner.",
    "When you are kind to a thing, said the Fairy, it shows you its other face, the face that is always there but seldom seen.",
    "I have walked all the way from yesterday, said the old man, and I am only a little tired.",
    "We were almost there, said Tyltyl, and yet we have come home empty-handed. Not empty-handed, said Mytyl. Look — and she held up her open palms full of nothing, which was full of light.",
    "The Bluebird flew away. It always does. That is part of its beauty.",
    "If you ever find her, said the Fairy at the door, please do not lock her up. Open the window. She will come back.",
  ],
  wind: [
    "The Mole had been working very hard all the morning, spring-cleaning his little home. Suddenly he flung down his brush, said 'Hang spring-cleaning!' and bolted out of the house.",
    "Believe me, my young friend, there is nothing — absolutely nothing — half so much worth doing as simply messing about in boats.",
    "The clever men at Oxford know all that there is to be knowed. But they none of them know one half as much as intelligent Mr. Toad!",
    "After luncheon, Toad walked off into the dewy meadows, lay on his back in the grass, and watched the white clouds.",
    "The Rat was sitting on the river bank, singing a little song. He had just composed it himself, so he was very taken up with it.",
    "Spring was moving in the air above and in the earth below and around him, penetrating even his dark and lowly little house.",
    "The line of the horizon was clear and hard against the sky, and in one particular quarter it showed black against a silvery climbing phosphorescence.",
    "He thought his happiness was complete when, as he meandered aimlessly along, suddenly he stood by the edge of a full-fed river.",
    "Round and round and round it ran, this sleek, sinuous, full-bodied animal, chasing itself with merry laughter, gripping things and letting them go again, chuckling as it played with them.",
    "A river of shining water, going chuckling along its way, its red lights and its green lights wavering above the deep places.",
    "The Mole was so touched by his kind manner of speaking that he could find no voice to answer him; and he had to brush away a tear or two with the back of his paw.",
    "The afternoon sun was getting low as the Rat sculled gently homewards in a dreamy mood, murmuring poetry-things over to himself, and not paying much attention to Mole.",
    "There were ferries, all packed for a feast, and gardens descending to the very edge of the water, dotted with apple-trees in bloom.",
    "Home! That was what they meant, those caressing appeals, those soft touches wafted through the air, those little tugs at the heart.",
    "It was a golden afternoon. The smell of the dust they kicked up was rich and satisfying; out of thick orchards the chuckle of fowls came languidly.",
    "Such a rich chapter it had been, when one came to look back on it all! With illustrations so numerous and so very highly coloured!",
    "The Badger said heartily, 'Now then! I'll show you all over my little place.' And lit a lantern, and led the way down a very long and gloomy corridor.",
    "The wind played chuckling tunes in the high tops of the willows; the Mole, fascinated, gazed and gazed, and forgot that he had been hungry.",
  ],
  secret: [
    "If you look the right way, you can see that the whole world is a garden.",
    "Where you tend a rose, my lad, a thistle cannot grow.",
    "At first people refuse to believe that a strange new thing can be done, then they begin to hope it can be done, then they see it can be done — then it is done.",
    "Two things cannot be in one place. Where you tend a rose, my lad, a thistle cannot grow.",
    "Is the spring coming? he said. What is it like?",
    "Sometimes since I've been in the garden I've looked up through the trees at the sky and I have had a strange feeling of being happy as if something were pushing and drawing in my chest.",
    "She made herself stronger by fighting with the wind.",
    "One of the new things people began to find out in the last century was that thoughts — just mere thoughts — are as powerful as electric batteries.",
    "Mary had liked to look at her mother from a distance and she had thought her very pretty, but as she knew very little of her she could scarcely have been expected to love her.",
    "When new beautiful thoughts began to push out the old hideous ones, life began to come back to him.",
    "It's a beautiful place. You'll see it. The bushes are all tangled together, and roses have climbed and climbed and climbed till they hang from the branches and walls.",
    "Mistress Mary, quite contrary, how does your garden grow? With silver bells and cockle shells, and marigolds all in a row.",
    "She drew a long breath and listened to the sound of it as it swept through the tree-tops. It seemed like the lowest, softest, wildest sound in the world.",
    "Even if it isn't a real garden, she thought, even if it is dreary and grey, I can pretend it is beautiful.",
    "She did not know that she was beginning to love it because it was so deeply hidden away.",
    "I'm going to live forever and ever and ever! cried Colin grandly, waving his arms. I shall find out thousands and thousands of things.",
    "And then a beautiful thing happened. He thought of springs, and birds, and seeds in the ground. He thought of all the things in the world that go on.",
    "The robin ruffled his feathers when she did this, and then put his head on one side and made a chirping sound, looking at her brightly with his dewy eye.",
  ],

  // ─────────────────────────── MELANCHOLY ───────────────────────────
  // Note: keeping Rilke as widely-circulated short fragments
  rilke: [
    "Have patience with everything unresolved in your heart and try to love the questions themselves as if they were locked rooms or books written in a very foreign language.",
    "Perhaps all the dragons in our lives are princesses who are only waiting to see us act, just once, with beauty and courage.",
    "The only journey is the one within.",
    "Let everything happen to you: beauty and terror. Just keep going. No feeling is final.",
    "Be patient toward all that is unsolved in your heart and try to love the questions themselves.",
    "Perhaps everything that frightens us is, in its deepest essence, something helpless that wants our love.",
    "If your daily life seems poor, do not blame it; blame yourself, tell yourself that you are not poet enough to call forth its riches.",
    "Believe in a love that is being stored up for you like an inheritance.",
    "For one human being to love another; that is perhaps the most difficult of all our tasks.",
    "Live the questions now. Perhaps you will then gradually, without noticing it, live along some distant day into the answer.",
    "Works of art are of an infinite loneliness, and with nothing to be so little appreciated as with criticism. Only love can grasp and hold and fairly judge them.",
    "I want to be with those who know secret things or else alone.",
    "Going inside yourself is harder than going to Mars.",
    "Don't be confused by the surfaces; in the depths everything becomes law.",
    "Surely all art is the result of one's having been in danger, of having gone through an experience all the way to the end, where no one can go any further.",
    "The future enters into us, in order to transform itself in us, long before it happens.",
    "Things aren't all so tangible and sayable as people would usually have us believe; most experiences are unsayable.",
    "There is only one solitude, and it is large and not easy to bear.",
    "Try to love the questions themselves like locked rooms and like books that are written in a very foreign tongue.",
  ],
  pessoa: [
    "I've always rejected being understood. To be understood is to prostitute oneself.",
    "Literature is the most agreeable way of ignoring life.",
    "My soul is a hidden orchestra; I know not what instruments, what fiddlestrings and harps, drums and tambours I sound and clash inside myself.",
    "I am nothing. I shall never be anything. I cannot wish to be anything. Apart from that, I have within me all the dreams of the world.",
    "I have always been a dreamer. I never knew that being one was supposed to be my distinction.",
    "Tedium is the lack of a mythology.",
    "To live is to be other. It's not even possible to feel, if one feels today what one felt yesterday.",
    "The feelings that hurt most, the emotions that sting most, are those that are absurd.",
    "I'm beginning to know myself. I don't exist. I'm the gap between what I'd like to be and what others have made of me.",
    "Whether I like it or not, life consists of those moments when one feels that the simplest thing of all is also the strangest.",
    "Sometimes I think I'll never leave Rua dos Douradores. Once written down, this seems to me like eternity.",
    "I write to forget, the way an alcoholic drinks.",
    "The whole of life is a dream. No one knows what he's doing, no one knows what he wants, no one knows what he knows.",
    "My past is everything I failed to be.",
    "I suffer from life, and from other people. I cannot look at reality face to face. The sun itself disheartens and depresses me.",
    "I went to bed early. The streets are quiet now, but the noise of my heart will not let me sleep.",
    "Each one of us is several, is many, is a profusion of selves.",
    "All life is the dream we are dreaming.",
    "We never love anyone. What we love is the idea we have of someone. It's our own concept — our own selves — that we love.",
    "If I write what I feel, it's to lower the fever of feeling.",
  ],
  dickinson: [
    "Hope is the thing with feathers that perches in the soul, and sings the tune without the words, and never stops at all.",
    "Tell all the truth but tell it slant — success in circuit lies.",
    "I dwell in Possibility — a fairer house than Prose.",
    "If I can stop one heart from breaking, I shall not live in vain.",
    "Forever is composed of nows.",
    "Saying nothing sometimes says the most.",
    "The brain is wider than the sky.",
    "I'm nobody! Who are you? Are you nobody, too? Then there's a pair of us — don't tell!",
    "Not knowing when the dawn will come, I open every door.",
    "If I read a book and it makes my whole body so cold no fire can ever warm me, I know that is poetry.",
    "A word is dead when it is said, some say. I say it just begins to live that day.",
    "Because I could not stop for Death — He kindly stopped for me — the Carriage held but just Ourselves and Immortality.",
    "Much madness is divinest sense to a discerning eye.",
    "There is no frigate like a book to take us lands away.",
    "Find ecstasy in life; the mere sense of living is joy enough.",
    "That love is all there is, is all we know of love.",
    "Hope is a strange invention — a patent of the heart — in unremitting action, yet never wearing out.",
    "I never saw a moor, I never saw the sea; yet know I how the heather looks, and what a wave must be.",
    "The soul should always stand ajar, ready to welcome the ecstatic experience.",
    "To live is so startling it leaves little time for anything else.",
  ],
  kierkegaard: [
    "Anxiety is the dizziness of freedom.",
    "Life can only be understood backwards; but it must be lived forwards.",
    "Most men pursue pleasure with such breathless haste that they hurry past it.",
    "People demand freedom of speech as a compensation for the freedom of thought which they seldom use.",
    "The greatest hazard of all, losing one's self, can occur very quietly in the world, as if it were nothing at all.",
    "To dare is to lose one's footing momentarily. Not to dare is to lose oneself.",
    "Patience is necessary, and one cannot reap immediately where one has sown.",
    "Boredom is the root of all evil — the despairing refusal to be oneself.",
    "Just as in earthly life lovers long for the moment when they are able to breathe forth their love for each other, to let their souls blend in a soft whisper.",
    "Trouble is the common denominator of living. It is the great equalizer.",
    "A man who as a physical being is always turned toward the outside, thinking that his happiness lies outside him, finally turns inward.",
    "If anyone on the verge of action should judge himself according to the outcome, he would never begin.",
    "Listen to the cry of a woman in labor at the hour of giving birth — look at the dying man's struggle at his last extremity, and then tell me whether something that begins and ends thus could be intended for enjoyment.",
    "The self is a relation that relates itself to itself.",
    "Above all, do not lose your desire to walk. Every day I walk myself into a state of well-being and walk away from every illness.",
    "There are two ways to be fooled. One is to believe what isn't true; the other is to refuse to believe what is true.",
    "I see it all perfectly; there are two possible situations — one can either do this or that. My honest opinion and my friendly advice is this: do it or do not do it — you will regret both.",
    "Marry, you will regret it; don't marry, you will also regret it. Laugh at the world's foolishness, you will regret it; weep over it, you will regret that too.",
    "Faith is the highest passion in a human being. Many in every generation may not come that far, but none comes further.",
  ],

  // ─────────────────────────── ADVENTURE ───────────────────────────
  mobydick: [
    "Call me Ishmael. Some years ago — never mind how long precisely — having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.",
    "Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul, I account it high time to get to sea as soon as I can.",
    "Better sleep with a sober cannibal than a drunk Christian.",
    "Towards thee I roll, thou all-destroying but unconquering whale; to the last I grapple with thee; from hell's heart I stab at thee.",
    "There is a wisdom that is woe; but there is a woe that is madness.",
    "It is not down on any map; true places never are.",
    "I know not all that may be coming, but be it what it will, I'll go to it laughing.",
    "Meditation and water are wedded for ever.",
    "Ignorance is the parent of fear.",
    "There she blows! There she blows! A hump like a snow-hill! It is Moby Dick!",
    "Yes, as every one knows, meditation and water are wedded for ever.",
    "Whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, I account it high time to get to sea.",
    "All that most maddens and torments; all that stirs up the lees of things; all truth with malice in it; all that cracks the sinews and cakes the brain.",
    "There is no folly of the beast of the earth which is not infinitely outdone by the madness of men.",
    "Heaven have mercy on us all — Presbyterians and Pagans alike — for we are all somehow dreadfully cracked about the head, and sadly need mending.",
    "Real strength never impairs beauty or harmony, but it often bestows it.",
    "I try all things; I achieve what I can.",
    "A whale-ship was my Yale College and my Harvard.",
    "He piled upon the whale's white hump the sum of all the general rage and hate felt by his whole race from Adam down.",
    "So, what's all this fuss I have been making about, thought I to myself — the man's a human being just as I am: he has just as much reason to fear me, as I have to be afraid of him.",
    "It is the easiest thing in the world for a man to look as if he had a great secret in him.",
    "Round the world! There is much in that sound to inspire proud feelings; but whereto does all that circumnavigation conduct? Only through numberless perils to the very point whence we started.",
  ],
  verne: [
    "The sea is everything. It covers seven tenths of the terrestrial globe. Its breath is pure and healthy. It is an immense desert, where man is never lonely.",
    "I am not what is called a civilized man! I have done with society entirely, for reasons which I alone have the right of appreciating.",
    "We may brave human laws, but we cannot resist natural ones.",
    "Reality provides us with facts so romantic that imagination itself could add nothing to them.",
    "Look with all your eyes, look.",
    "Solitude, isolation, are painful things and beyond human endurance.",
    "Science, my lad, is made up of mistakes, but they are mistakes which it is useful to make, because they lead little by little to the truth.",
    "The sea does not belong to despots. Upon its surface men can still exercise unjust laws, fight, tear one another to pieces.",
    "How many things have been denied one day, only to become realities the next!",
    "There is no obstacle so great that it cannot be overcome by patience.",
    "The earth does not need new continents, but new men.",
    "I had as it were before me, in its tranquillity, an immense aquarium, the four sides of which were composed of plate glass.",
    "I felt the need of repose, and lay down upon a couch of zostera. Sleep, that brother of death, soon overcame me.",
    "Anything one man can imagine, other men can make real.",
    "Living means perpetual change.",
    "What an admirable language is the language of children, the smallest can give us lessons!",
    "Whilst there is life, there is hope. I beg to assert that for a brain to think, a heart to feel, an organism to act, is a work that surpasses all the wonders of the past.",
    "The Nautilus had no need of a crew. The mechanism of its propulsion was so simple that two men sufficed to manage it.",
    "Conseil and I sat watching the sea. The Pacific that day was of a blue so deep, so transparent, that one could have wished never to leave it.",
    "It was midnight when I left the salon, and the long sleep of an exhausted man was waiting for me at the end of the corridor.",
  ],
  treasure: [
    "Squire Trelawney, Dr. Livesey, and the rest of these gentlemen having asked me to write down the whole particulars about Treasure Island, from the beginning to the end.",
    "I remember him as if it were yesterday, as he came plodding to the inn door, his sea-chest following behind him in a hand-barrow.",
    "Fifteen men on the dead man's chest — yo-ho-ho, and a bottle of rum!",
    "Dead men don't bite.",
    "Pieces of eight! Pieces of eight! Pieces of eight!",
    "There is a kind of fate in this. It was Flint's voice. The treasure is buried, and not a soul knows where but us.",
    "A man who has been three years biting his nails on a desert island can't expect to appear as sane as you or me.",
    "I never saw a man who had less in him for his rank, and yet I never saw a man more beloved.",
    "He was a very silent man by custom. All day he hung round the cove, or upon the cliffs, with a brass telescope.",
    "I had not gone fifty yards before I reached the brow, and I saw my old friend the apple barrel, the lugger, and the schooner all in one view.",
    "It was about ten o'clock, and the sun shone on the slate-coloured water; the wind had hauled round to the east, and on every hand the rocks rose blackly.",
    "Drink and the devil had done for the rest — yo-ho-ho, and a bottle of rum!",
    "Many's the long night I've dreamed of cheese — toasted, mostly — and woke up again, and here I were.",
    "I was not new to violent death — I have served his Royal Highness the Duke of Cumberland, and got a wound myself at Fontenoy.",
    "There were several ravines, but the path I had chosen was the shortest, and the most direct, although the steepest.",
    "All the time he was jerking out these phrases he was stumping up and down the tavern on his crutch, slapping tables with his hand.",
    "If she don't act as I order, I'll die of it, Jim. And he gave me a wonderful, sly, comical wink.",
    "And here, with all my heart, I take my leave of the country, and cast a last glance back at the sea.",
    "Oxen and wain-ropes would not bring me back again to that accursed island; and the worst dreams that ever I have are when I hear the surf booming about its coasts.",
  ],
  kim: [
    "He sat, in defiance of municipal orders, astride the gun Zam-Zammah on her brick platform opposite the old Ajaib-Gher — the Wonder House, as the natives call the Lahore Museum.",
    "The Grand Trunk is the great highway of India. Look! Brahmins and chumars, bankers and tinkers, barbers and bunnias, pilgrims and potters — all the world coming and going.",
    "The road is the best of teachers, said the lama. He who follows it walks in the company of the great-souled.",
    "Now I understand, said the lama at last. The Search is sure.",
    "What is to do? It is enough that we go onwards.",
    "The earth is your mother. Sit on her quietly, and she will teach you.",
    "He who would travel happily must travel light.",
    "All India is full of holy men stammering gospels in strange tongues; shaken and consumed in the fires of their own zeal.",
    "Here is the lama's umbrella. There is no need of begging-bowl. We will eat from the railway baskets like sahibs.",
    "And what is Kim? he said. Thy chela. He is foreigner — sahib — but my chela.",
    "By the wayside trotted the consummated Brahmin bull, the white bull of Shiva. He came on without haste, brushing through the many-coloured crowd.",
    "The lama, never raising his eyes, snuffed the smoke of an evening cooking-fire upon the wind, his nostrils delicately distended.",
    "I knew thou couldst not long be steadfast. Yet thou hast come back. Sit, then, and eat.",
    "There is no pride among such as follow the Middle Way.",
    "He looked it over, the small black face working with intelligence, and shook his head: I love thee.",
    "From time to time, God causes men to be born — and thou art one of them — who have a lust to go abroad at the risk of their lives and discover news.",
    "It is a wheel-house — a wheel-house indeed! cried the lama. He rocked to and fro, weeping unrestrainedly.",
    "I do not know why, but I am very weary, said Kim, and he laid his head on the lama's lap and slept till past noon.",
    "We be craftsmen together, thou and I, said the Mahratta. Thou wilt come over to me when thy service permits?",
    "Oh, lookee — Brahmin and Sikh, banker and Pathan, beggar and king. They all go down the Road. He pointed his thin chin towards the haze of dust where the Trunk Road rolled south.",
  ],
};

// Build a final PASSAGES object: every book gets at least 6 entries, falling back if missing.
const FALLBACK = [
  "A passage is a small room you enter for a few minutes. The walls are made of sentences. You leave the room a little more yourself than you came in.",
  "When you read by hand, the words go in twice — once through the eye and once through the finger. The second way is slower but truer.",
  "Take your time. The page will wait for you. So will the next one.",
  "Some evenings the right thing to do is type a few sentences from a book you love and then go to bed.",
  "The point is not to finish. The point is to be here.",
];

const PASSAGES = {};
window.BOOKS.forEach((b) => {
  const arr = FULL_PASSAGES[b.id];
  PASSAGES[b.id] = (arr && arr.length >= 4) ? arr : FALLBACK;
});

// Per-book reading position store
const PROGRESS_KEY = 'meditype.progress';
function loadProgress() {
  try { return JSON.parse(localStorage.getItem(PROGRESS_KEY) || '{}'); }
  catch { return {}; }
}
function saveProgressFor(bookId, passageIdx, typedLen) {
  const data = loadProgress();
  data[bookId] = { passageIdx, typedLen, updatedAt: Date.now() };
  localStorage.setItem(PROGRESS_KEY, JSON.stringify(data));
}
function getProgressFor(bookId) {
  return loadProgress()[bookId] || null;
}
function clearProgressFor(bookId) {
  const data = loadProgress();
  delete data[bookId];
  localStorage.setItem(PROGRESS_KEY, JSON.stringify(data));
}

// Override window.PASSAGES with the full set, expose helpers.
// Also rewrite each BOOK's `passages` count to match the real array length so
// the library/prepare/reading screens display honest "passage X of N".
window.BOOKS.forEach((b) => {
  const arr = PASSAGES[b.id];
  if (arr) b.passages = arr.length;
});

Object.assign(window, {
  PASSAGES,
  loadProgress, saveProgressFor, getProgressFor, clearProgressFor,
});
